using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._GeostatisticalAnalystTools._Interpolation
{
    /// <summary>
    /// <para>Radial Basis Functions</para>
    /// <para>Uses one of five basis functions to interpolate a surfaces that passes through the input points exactly.</para>
    /// <para>使用五个基函数之一对精确通过输入点的曲面进行插值。</para>
    /// </summary>    
    [DisplayName("Radial Basis Functions")]
    public class RadialBasisFunctions : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public RadialBasisFunctions()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input features</para>
        /// <para>The input point features containing the z-values to be interpolated.</para>
        /// <para>包含要插值的 z 值的输入点要素。</para>
        /// </param>
        /// <param name="_z_field">
        /// <para>Z value field</para>
        /// <para>Field that holds a height or magnitude value for each point. This can be a numeric field or the Shape field if the input features contain z-values or m-values.</para>
        /// <para>保存每个点的高度或大小值的字段。这可以是数值字段，也可以是形状字段（如果输入要素包含 z 值或 m 值）。</para>
        /// </param>
        public RadialBasisFunctions(object _in_features, object _z_field)
        {
            this._in_features = _in_features;
            this._z_field = _z_field;
        }
        public override string ToolboxName => "Geostatistical Analyst Tools";

        public override string ToolName => "Radial Basis Functions";

        public override string CallName => "ga.RadialBasisFunctions";

        public override List<string> AcceptEnvironments => ["cellSize", "coincidentPoints", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "snapRaster", "workspace"];

        public override object[] ParameterInfo => [_in_features, _z_field, _out_ga_layer, _out_raster, _cell_size, _search_neighborhood, _radial_basis_functions.GetGPValue(), _small_scale_parameter];

        /// <summary>
        /// <para>Input features</para>
        /// <para>The input point features containing the z-values to be interpolated.</para>
        /// <para>包含要插值的 z 值的输入点要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Z value field</para>
        /// <para>Field that holds a height or magnitude value for each point. This can be a numeric field or the Shape field if the input features contain z-values or m-values.</para>
        /// <para>保存每个点的高度或大小值的字段。这可以是数值字段，也可以是形状字段（如果输入要素包含 z 值或 m 值）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z value field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _z_field { get; set; }


        /// <summary>
        /// <para>Output geostatistical layer</para>
        /// <para>The geostatistical layer produced. This layer is required output only if no output raster is requested.</para>
        /// <para>生成的地统计图层。仅当未请求输出栅格时，此图层才是必需的输出。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output geostatistical layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_ga_layer { get; set; } = null;


        /// <summary>
        /// <para>Output raster</para>
        /// <para>The output raster. This raster is required output only if no output geostatistical layer is requested.</para>
        /// <para>输出栅格。仅当未请求输出地统计图层时，此栅格才是必需的输出。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_raster { get; set; } = null;


        /// <summary>
        /// <para>Output cell size</para>
        /// <para><xdoc>
        ///   <para>The cell size at which the output raster will be created.</para>
        ///   <para>This value can be explicitly set in the Environments by the Cell Size parameter.</para>
        ///   <para>If not set, it is the shorter of the width or the height of the extent of the input point features, in the input spatial reference, divided by 250.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将创建输出栅格的像元大小。</para>
        ///   <para>此值可以通过像元大小参数在“环境”中显式设置。</para>
        ///   <para>如果未设置，则为输入空间参考中输入点要素范围的宽度或高度除以 250 的较短者。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output cell size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _cell_size { get; set; } = null;


        /// <summary>
        /// <para>Search neighborhood</para>
        /// <para><xdoc>
        ///   <para>Defines which surrounding points will be used to control the output. Standard is the default.</para>
        ///   <para>Standard</para>
        ///   <bulletList>
        ///     <bullet_item>Major semiaxis—The major semiaxis value of the searching neighborhood.</bullet_item><para/>
        ///     <bullet_item>Minor semiaxis—The minor semiaxis value of the searching neighborhood.</bullet_item><para/>
        ///     <bullet_item>Angle—The angle of rotation for the axis (circle) or semimajor axis (ellipse) of the moving window.</bullet_item><para/>
        ///     <bullet_item>Max neighbors—The maximum number of neighbors that will be used to estimate the value at the unknown location.</bullet_item><para/>
        ///     <bullet_item>Min neighbors—The minimum number of neighbors that will be used to estimate the value at the unknown location.</bullet_item><para/>
        ///     <bullet_item>Sector Type—The geometry of the neighborhood.
        ///     <bulletList>
        ///       <bullet_item>One sector—Single ellipse.  </bullet_item><para/>
        ///       <bullet_item>Four sectors—Ellipse divided into four sectors.  </bullet_item><para/>
        ///       <bullet_item>Four sectors shifted—Ellipse divided into four sectors and shifted 45 degrees.  </bullet_item><para/>
        ///       <bullet_item>Eight sectors—Ellipse divided into eight sectors.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <para>Standard Circular</para>
        ///   <bulletList>
        ///     <bullet_item>Radius—The length of the radius of the search circle.</bullet_item><para/>
        ///     <bullet_item>Angle—The angle of rotation for the axis (circle) or semimajor axis (ellipse) of the moving window.</bullet_item><para/>
        ///     <bullet_item>Max neighbors—The maximum number of neighbors that will be used to estimate the value at the unknown location.</bullet_item><para/>
        ///     <bullet_item>Min neighbors—The minimum number of neighbors that will be used to estimate the value at the unknown location.</bullet_item><para/>
        ///     <bullet_item>Sector Type—The geometry of the neighborhood.
        ///     <bulletList>
        ///       <bullet_item>One sector—Single ellipse.  </bullet_item><para/>
        ///       <bullet_item>Four sectors—Ellipse divided into four sectors.  </bullet_item><para/>
        ///       <bullet_item>Four sectors shifted—Ellipse divided into four sectors and shifted 45 degrees.  </bullet_item><para/>
        ///       <bullet_item>Eight sectors—Ellipse divided into eight sectors.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义将用于控制输出的周围点。标准是默认值。</para>
        ///   <para>标准</para>
        ///   <bulletList>
        ///     <bullet_item>主半轴 - 搜索邻域的主半轴值。</bullet_item><para/>
        ///     <bullet_item>小半轴 - 搜索邻域的短半轴值。</bullet_item><para/>
        ///     <bullet_item>角度 （Angle） - 移动窗口的轴（圆）或半长轴（椭圆）的旋转角度。</bullet_item><para/>
        ///     <bullet_item>最大邻居数 - 将用于估计未知位置值的最大邻居数。</bullet_item><para/>
        ///     <bullet_item>最小邻居 - 将用于估计未知位置的值的最小邻居数。</bullet_item><para/>
        /// <bullet_item>扇区类型 - 邻域的几何。
        ///     <bulletList>
        ///       <bullet_item>一个扇区 - 单个椭圆。</bullet_item><para/>
        ///       <bullet_item>四个扇区 - 椭圆分为四个扇区。</bullet_item><para/>
        ///       <bullet_item>四个扇区移动 - 椭圆分为四个扇区并移动 45 度。</bullet_item><para/>
        ///       <bullet_item>八个扇区 - 椭圆分为八个扇区。</bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <para>标准通函</para>
        ///   <bulletList>
        ///     <bullet_item>半径 - 搜索圆半径的长度。</bullet_item><para/>
        ///     <bullet_item>角度 （Angle） - 移动窗口的轴（圆）或半长轴（椭圆）的旋转角度。</bullet_item><para/>
        ///     <bullet_item>最大邻居数 - 将用于估计未知位置值的最大邻居数。</bullet_item><para/>
        ///     <bullet_item>最小邻居 - 将用于估计未知位置的值的最小邻居数。</bullet_item><para/>
        /// <bullet_item>扇区类型 - 邻域的几何。
        ///     <bulletList>
        ///       <bullet_item>一个扇区 - 单个椭圆。</bullet_item><para/>
        ///       <bullet_item>四个扇区 - 椭圆分为四个扇区。</bullet_item><para/>
        ///       <bullet_item>四个扇区移动 - 椭圆分为四个扇区并移动 45 度。</bullet_item><para/>
        ///       <bullet_item>八个扇区 - 椭圆分为八个扇区。</bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search neighborhood")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _search_neighborhood { get; set; } = null;


        /// <summary>
        /// <para>Radial basis function</para>
        /// <para><xdoc>
        ///   <para>There are five radial basis functions available.</para>
        ///   <bulletList>
        ///     <bullet_item>Thin plate spline—Thin-plate spline function</bullet_item><para/>
        ///     <bullet_item>Spline with tension— Spline with tension function</bullet_item><para/>
        ///     <bullet_item>Completely regularized spline— Completely regularized spline function</bullet_item><para/>
        ///     <bullet_item>Multiquadric— Multiquadric spline function</bullet_item><para/>
        ///     <bullet_item>Inverse multiquadric—Inverse multiquadric spline function</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>有五种径向基函数可用。</para>
        ///   <bulletList>
        ///     <bullet_item>薄板样条曲线 （Thin plate spline） - 薄板样条函数</bullet_item><para/>
        ///     <bullet_item>带张力的样条 （Spline with tension） — 带张力函数的花键</bullet_item><para/>
        ///     <bullet_item>完全正则化样条— 完全正则化样条函数</bullet_item><para/>
        ///     <bullet_item>多二次—多二次样条函数</bullet_item><para/>
        ///     <bullet_item>逆多二次曲线—逆多二次样条函数</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Radial basis function")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _radial_basis_functions_value _radial_basis_functions { get; set; } = _radial_basis_functions_value._COMPLETELY_REGULARIZED_SPLINE;

        public enum _radial_basis_functions_value
        {
            /// <summary>
            /// <para>Completely regularized spline</para>
            /// <para>Completely regularized spline— Completely regularized spline function</para>
            /// <para>完全正则化样条— 完全正则化样条函数</para>
            /// </summary>
            [Description("Completely regularized spline")]
            [GPEnumValue("COMPLETELY_REGULARIZED_SPLINE")]
            _COMPLETELY_REGULARIZED_SPLINE,

            /// <summary>
            /// <para>Spline with tension</para>
            /// <para>Spline with tension— Spline with tension function</para>
            /// <para>带张力的样条 （Spline with tension） — 带张力函数的花键</para>
            /// </summary>
            [Description("Spline with tension")]
            [GPEnumValue("SPLINE_WITH_TENSION")]
            _SPLINE_WITH_TENSION,

            /// <summary>
            /// <para>Multiquadric</para>
            /// <para>Multiquadric— Multiquadric spline function</para>
            /// <para>多二次—多二次样条函数</para>
            /// </summary>
            [Description("Multiquadric")]
            [GPEnumValue("MULTIQUADRIC_FUNCTION")]
            _MULTIQUADRIC_FUNCTION,

            /// <summary>
            /// <para>Inverse multiquadric</para>
            /// <para>Inverse multiquadric—Inverse multiquadric spline function</para>
            /// <para>逆多二次曲线—逆多二次样条函数</para>
            /// </summary>
            [Description("Inverse multiquadric")]
            [GPEnumValue("INVERSE_MULTIQUADRIC_FUNCTION")]
            _INVERSE_MULTIQUADRIC_FUNCTION,

            /// <summary>
            /// <para>Thin plate spline</para>
            /// <para>Thin plate spline—Thin-plate spline function</para>
            /// <para>薄板样条曲线 （Thin plate spline） - 薄板样条函数</para>
            /// </summary>
            [Description("Thin plate spline")]
            [GPEnumValue("THIN_PLATE_SPLINE")]
            _THIN_PLATE_SPLINE,

        }

        /// <summary>
        /// <para>Small scale parameter</para>
        /// <para>Used to calculate the weights assigned to the points located in the moving window. Each of the radial basis functions has a parameter that controls the degree of small-scale variation of the surface. The (optimal) parameter is determined by finding the value that minimizes the root mean square prediction error (RMSPE).</para>
        /// <para>用于计算分配给位于移动窗口中的点的权重。每个径向基函数都有一个参数，用于控制曲面的小尺度变化程度。（最佳）参数是通过查找最小化均方根预测误差 （RMSPE） 的值来确定的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Small scale parameter")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _small_scale_parameter { get; set; } = null;


        public RadialBasisFunctions SetEnv(object cellSize = null, object coincidentPoints = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object snapRaster = null, object workspace = null)
        {
            base.SetEnv(cellSize: cellSize, coincidentPoints: coincidentPoints, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, snapRaster: snapRaster, workspace: workspace);
            return this;
        }

    }

}